package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Order;
import cn.wolfcode.trip.base.query.OrderQueryObject;
import cn.wolfcode.trip.base.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order record);

    Order selectByPrimaryKey(Long id);

    List<Order> selectAll();

    List<Order> selectForList(OrderQueryObject qo);

    List<Order> getOrderByUserId(@Param("userId") Long userId, @Param("state") Integer state);

    void updateBatch(@Param("array") Long[] ids, @Param("state") Integer state);

    void updateTotalIntegralById(Order order);
}